<template>
    <div class="city">
        <p v-for="item,index of hots" :key="index" @click="handleCity(item)">{{item}}</p>
    </div>
</template>

<script>
export default {
    data() {
        return {
            hots:["武汉","长沙","苏州"]
        }
    },
    methods: {
        handleCity(city){
            this.$store.dispatch("changeCity",city)
            this.$router.back()
        }
    },
}
</script>

<style>

</style>